unit uOtlivGroupSizePosition;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ComCtrls, ToolWin, Grids, DBGridEh, StdCtrls;

type
  TfOtlivGroupSizePosition = class(TForm)
    GroupBox1: TGroupBox;
    DBGridEh1: TDBGridEh;
    GroupBox2: TGroupBox;
    DBGridEh2: TDBGridEh;
    tbOtlivGroupSizePosition: TToolBar;
    tbAddOtlivGroupSizePosition: TToolButton;
    tbDelOtlivGroupSizePosition: TToolButton;
    procedure tbAddOtlivGroupSizePositionClick(Sender: TObject);
    procedure tbDelOtlivGroupSizePositionClick(Sender: TObject);
    procedure DBGridEh2KeyPress(Sender: TObject; var Key: Char);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  fOtlivGroupSizePosition: TfOtlivGroupSizePosition;

implementation

uses uDBData;

{$R *.dfm}

procedure TfOtlivGroupSizePosition.tbAddOtlivGroupSizePositionClick(
  Sender: TObject);
begin
  fDBData.InsertRecord(fDBData.dOtlivGroupSizePosition);
end;

procedure TfOtlivGroupSizePosition.tbDelOtlivGroupSizePositionClick(
  Sender: TObject);
begin
  fDBData.DeleteRecord(fDBData.dOtlivGroupSizePosition);
end;

procedure TfOtlivGroupSizePosition.DBGridEh2KeyPress(Sender: TObject;
  var Key: Char);
begin
  if Key = #13 then (Sender as TDBGridEh).DataSource.DataSet.Post;
end;

end.
